<?php
/**
 * SiteMap
 * 
 * @copyright 	Copyright (c) 2011 thinkapk.com All rights reserved.
 * @package 	ThinkAPK_Action
 * @link 		http://www.thinkapk.com/
 * @author 		richie <richbossman@163.com>
 * @version 	$Id: SitemapAction.class.php 7482 2011-05-19 10:12:51Z richie $
 * 
 */
class SitemapAction extends ThinkAPK_Action_Web {
	
	function _before_index(){
		$this->setTitle('网站地图');
		$this->setPosition(0, '网站地图');
		$this->setKeywords('网站地图,安卓软件分类,Android分类,Android下载排行,安卓软件下载排行');
		$this->setDescription('创想安卓所有软件分类与排行榜分类，再加上最热门的Android搜索关键词');
		$this->assign('downcat', D('Category')->get(0, 'Top'));
		$this->assign('cates', D('Category')->get(0, 'App'));
		$this->assign('tagslist', $this->getHotTags());
	}
	
	function getHotTags($limit=100){
		return M('Tags')->where('total>0')->order('click DESC')->limit($limit)->field('id,tags,total')->findAll();
	}
}
?>